const { Schema, model } = require('mongoose');

const moment = require('moment');


//设置数据集合
const adminSchema = new Schema({
    status: String, //权限
    account: String, //账号
    password: String, //密码
    creatTime: {
        type: String,
        default: moment().format('YYYY年MM月DD日')
    }, //创建时间
}, { versionKey: false });

//设置数据集合的模型
const Admin = model('Admin', adminSchema, 'admin');

//暴露
module.exports.Admin = Admin;